class EpisodeOfsController < ApplicationController
  def index
    @episode_ofs = EpisodeOf.all
  end

  def show
    @episode_of = EpisodeOf.find(params[:id])
  end

  def new
    @episode_of = EpisodeOf.new
  end

  def create
    @episode_of = EpisodeOf.new(params[:episode_of])
    if @episode_of.save
      redirect_to @episode_of, :notice => "Successfully created episode of."
    else
      render :action => 'new'
    end
  end

  def edit
    @episode_of = EpisodeOf.find(params[:id])
  end

  def update
    @episode_of = EpisodeOf.find(params[:id])
    if @episode_of.update_attributes(params[:episode_of])
      redirect_to @episode_of, :notice  => "Successfully updated episode of."
    else
      render :action => 'edit'
    end
  end

  def destroy
    @episode_of = EpisodeOf.find(params[:id])
    @episode_of.destroy
    redirect_to episode_ofs_url, :notice => "Successfully destroyed episode of."
  end
end
